<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use app\common\widgets\MyFileUpload;
use yii\helpers\ArrayHelper;

/* @var $this yii\web\View */
/* @var $model app\models\GkyWeWelcome */
/* @var $form yii\widgets\ActiveForm */
?>

<script type="text/javascript" src="js/qiniuupload/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="js/qiniuupload/plupload/plupload.full.min.js"></script>
<script type="text/javascript" src="js/qiniuupload/plupload/i18n/zh_CN.js"></script>
<script type="text/javascript" src="js/qiniuupload/ui.js"></script>
<script type="text/javascript" src="js/qiniuupload/qiniu.js"></script>
<script type="text/javascript" src="js/qiniuupload/highlight/highlight.js"></script>
<script type="text/javascript" src="js/qiniuupload/main.js"></script>

<div class="gky-we-welcome-form">
<div class="panel panel-default">
        <!--<div class="panel-heading text-center" style="background: #003eff;color:white">gky-we-reply-text</div>-->
        <div class="panel-body">
    <?php $form = ActiveForm::begin([
        'options' => ['class' => 'form-horizontal form-group'],
        'fieldConfig' => [
            'template' => "{label}<div class=\"col-lg-8\">{input}</div>",
            'labelOptions' => ['class' => 'col-lg-4', 'style' => 'margin-right:-30px'],
        ]
    ]); ?>
            
        <div class="row">
            <div class="col-lg-4 col-xs-12 col-sm-4 col-md-4">
                <?= $form->field($model, 'title')->textInput(['maxlength' => true]) ?>
            </div>
            <div class="col-lg-4 col-xs-12 col-sm-4 col-md-4">
            <?= $form->field($model, 'description')->textInput(['maxlength' => true]) ?>
            </div>
            <div class="col-lg-4 col-xs-12 col-sm-4 col-md-4">
                <?= $form->field($model, 'jumpUrl')->textInput(['maxlength' => true]) ?>
            </div>
        </div>
            
        <div class="row">
            <div class="col-lg-4 col-xs-12 col-sm-4 col-md-4">
                <?php
                    $accounts = \app\models\GkyWeAccount::find()->all();
                    echo $form->field($model, 'weoid')
                        ->dropDownList(
                            ArrayHelper::map($accounts,'weoid','wename')
                        )
                        ->label('公众号')
                    ?>
                </div>
        </div>
        <div class="row">
            <div class="col-lg-4 col-xs-12 col-sm-4 col-md-4" style="margin-top: 23px">
                <?= MyFileUpload::widget() ?>
            </div>
        </div>
       
        <div class="row">
            <div class="form-group text-center col-lg-12">
                <?= Html::submitButton('保存', ['class' => 'btn btn-success']) ?>
                <?= Html::a('返回', ['index'], ['class' => 'btn btn-primary']) ?>
           </div>
        </div>
                
    
    
    <?php ActiveForm::end(); ?>
      </div>
    </div>

</div>

